home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4057 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  63 lines

  1. Path: GIMLI.genias.de!usenet
  2. From: Andreas Haas <andreas>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: rebooting computer in C.
  5. Date: 1 Feb 1996 16:36:23 GMT
  6. Organization: GENIAS Software GmbH
  7. Message-ID: <4eqq67$gj0@GIMLI.genias.de>
  8. References: <4emjjj$713@donatello.leonardo.net>
  9. NNTP-Posting-Host: thorin.genias.de
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.2 sun4c)
  14. X-URL: news:4emjjj$713@donatello.leonardo.net
  15.  
  16. DavidJo@zianet.com (DavidJo) wrote:
  17. >How would I go about making the computer reboot from inside a C
  18. >program?
  19. >
  20.  
  21. Under DOS/Windows s.th. like ...
  22.  
  23.  .
  24.  .
  25.  .
  26.  
  27. char *s = NULL;
  28.  
  29. for (;;)
  30.    *s++ = random(256);
  31.  
  32.  .
  33.  .
  34.  . 
  35.  
  36. ..  should work 8)
  37.  
  38. Under SunOS I found
  39.  
  40.      #include <sys/reboot.h>
  41.  
  42.      reboot(howto, [ bootargs ] )
  43.      int howto;
  44.      char *bootargs;
  45.  
  46. in the man pages
  47.  
  48.  
  49.  
  50. >Any help would be great.
  51. >
  52. >Thank You
  53. >
  54.  
  55. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  56.                         Andreas Haas
  57. GENIAS Software GmbH             | Email:  andreas@genias.de
  58. Erzgebirgstr. 2 B                | Tel.:   ++49 +9401 9200-0/41
  59. D-93073 Neutraubling/Germany     | FAX:    ++49 +9401 9200-92
  60. http://www.genias.de             |
  61. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  62.  
  63.